_f_i_l_d_e_s is a file descriptor obtained from a _cccc_rrrr_eeee_aaaa_tttt, _oooo_pppp_eeee_nnnn, _dddd_uuuu_pppp, _ffff_cccc_nnnn_tttt_llll,
_pppp_iiii_pppp_eeee, or _iiii_oooo_cccc_nnnn_tttt_llll system call. _cccc_llll_oooo_ssss_eeee closes the file descriptor indicated
by _f_i_l_d_e_s. All outstanding record locks owned by the process (on the
file indicated by _f_i_l_d_e_s) are removed.
If the link count of the file is zero, when all file descriptors
associated with the file have been closed, the space occupied by the file
is freed and the file is no longer accessible.
If a STREAMS-based [see _iiii_nnnn_tttt_rrrr_oooo(2)] _f_i_l_d_e_s is closed, and the calling
process had previously registered to receive a _SSSS_IIII_GGGG_PPPP_OOOO_LLLL_LLLL signal [see
_ssss_iiii_gggg_nnnn_aaaa_llll(5)] for events associated with that stream [see _IIII______SSSS_EEEE_TTTT_SSSS_IIII_GGGG in
_ssss_tttt_rrrr_eeee_aaaa_mmmm_iiii_oooo(7)], the calling process will be unregistered for events
associated with the stream. The last _cccc_llll_oooo_ssss_eeee for a stream causes the
stream associated with _f_i_l_d_e_s to be dismantled. If _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY and
_OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK are clear and there have been no signals posted for the
stream, and if there are data on the module's write queue, _cccc_llll_oooo_ssss_eeee waits up
to 15 seconds (for each module and driver) for any output to drain before
dismantling the stream. The time delay can be changed via an _IIII______SSSS_EEEE_TTTT_CCCC_LLLL_TTTT_IIII_MMMM_EEEE
_iiii_oooo_cccc_tttt_llll request [see _ssss_tttt_rrrr_eeee_aaaa_mmmm_iiii_oooo(7)]. If _OOOO______NNNN_DDDD_EEEE_LLLL_AAAA_YYYY or _OOOO______NNNN_OOOO_NNNN_BBBB_LLLL_OOOO_CCCC_KKKK is set, or if
there are any pending signals, _cccc_llll_oooo_ssss_eeee does not wait for output to drain,
and dismantles the stream immediately.
If _f_i_l_d_e_s is associated with one end of a pipe, the last _cccc_llll_oooo_ssss_eeee causes a
hangup to occur on the other end of the pipe. In addition, if the other
end of the pipe has been named [see _ffff_aaaa_tttt_tttt_aaaa_cccc_hhhh(3C)], the last _cccc_llll_oooo_ssss_eeee forces
the named end to be detached [see _ffff_dddd_eeee_tttt_aaaa_cccc_hhhh(3C)]. If the named end has no
open processes associated with it and becomes detached, the stream
associated with that end is also dismantled.
When closing all (or most) of a process's open file descriptors, it is
best not to close all descriptors up to the system maximum, as this value
can be large. See _gggg_eeee_tttt_dddd_tttt_aaaa_bbbb_llll_eeee_hhhh_iiii(3C).
The named file is closed unless one or more of the following are true:
_EEEE_BBBB_AAAA_DDDD_FFFF _f_i_l_d_e_s is not a valid open file descriptor.
_EEEE_IIII_NNNN_TTTT_RRRR A signal was caught during the _cccc_llll_oooo_ssss_eeee system call.
_EEEE_TTTT_IIII_MMMM_EEEE_DDDD_OOOO_UUUU_TTTT The object of the close is located on a remote system
which is not available [see _iiii_nnnn_tttt_rrrr_oooo(2)].